8.1 Foundational Architectural Concepts
8.1.1 Architectural Concepts of Linux Memory Management
The Linux kernel is engineered to scale across a vast taxonomy of disparate hardware platforms, which may utilize uniprocessor (single-core) layouts or symmetric multiprocessing (multi-core) topologies. Within uniprocessor environments, all physical memory banks may reside in close proximity to the CPU, guaranteeing uniform access latencies across the entire memory space; alternatively, a portion of the memory footprint may be physically closer to peripheral controllers to facilitate High-Speed Direct Memory Access (DMA) transactions, creating non-uniform latencies for CPU access loops. In symmetric multiprocessing infrastructures, physical memory is frequently partitioned into multiple discrete channels or groups. Certain blocks may be isolated for the exclusive use of a single execution core, others may be shared globally among all active processing cores, and some may be bridged adjacent to IO endpoints to optimize DMA transfers. Because the electrical tracing distances separating individual storage matrices from different CPU cores vary significantly, each core exhibits unique access latency parameters when addressing the same chunk of physical memory.
To model this variance in memory access latencies precisely, the Linux kernel architecture implements the Non-Uniform Memory Access (NUMA) paradigm to define and manage low-level physical memory topologies. Any hardware architecture where disparate processing elements experience asymmetric latencies when addressing different physical memory regions is categorized as a NUMA structure.
To fulfill hardware modularity constraints, volatile physical memory is structurally deployed as memory banks (or modules). The CPU experiences uniform access latencies when executing read/write sweeps across a single memory bank. The Linux memory management subsystem treats each distinct bank or clustered group as a standalone NUMA Node, represented internally by the struct pglist_data descriptor block. Through a standard type abstraction, this structure is aliased as the pg_data_t type. The master definition for the pglist_data structure is maintained within the core zones header module git/include/linux/mmzone.h. It primarily encapsulates tracking fields such as the node identifier index, the memory zones array housed within the node (detailed in the subsequent section), the total count of valid zones (nr_zones), a collection of fallback lookup pointer lists tracking zones across all active nodes (node_zonelist[]), the absolute physical Page Frame Number (PFN) boundary marking the node's origin (node_start_pfn), the total linear virtual span of the node measured in pages (node_spanned_pages), the actual count of physical page frames physically populated within the node (node_present_pages), and linked reference lists tracking localized zone maps.
Depending on individual electrical attributes and device usage models, the Linux kernel subdivides the physical memory allocation of each distinct node into several discrete, specialized Zones (ZONE_DMA, ZONE_DMA32, ZONE_NORMAL, ZONE_HIGHMEM, ZONE_MOVABLE, and ZONE_DEVICE), represented inside the system by the struct zone descriptor block.
-
ZONE_DMA and ZONE_DMA32: Dedicated memory margins fenced off to safely drive legacy and standard peripheral Direct Memory Access (DMA) address channels.
-
ZONE_NORMAL: The direct-mapped, generic memory space utilized by the core kernel to fulfill standard persistent allocations.
-
ZONE_HIGHMEM: High-memory regions that are not permanently mapped by the kernel's virtual page tables; to read or alter contents cached within high-memory blocks, the kernel must instantiate temporary mapping vectors at runtime.
-
ZONE_MOVABLE: Behaves similarly to standard memory zones with the structural exception that pages are marked as relocatable, meaning an identical virtual memory coordinate can be safely re-mapped to point down to alternative physical page frames to facilitate hot-unplug and memory compaction routines.
-
ZONE_DEVICE: Abstract zones allocated to model and manage non-volatile storage or dedicated hardware memory blocks hosted directly on external peripheral expansion buses (such as GPU high-bandwidth VRAM).
Operating systems typically orchestrate and link virtual structures to hardware blocks at a granular page-level (with a standard page consuming 4096 bytes of memory), and the Linux framework follows this exact design. Every single 4 KB block of physical memory is linked to an individual tracker structure named struct page, defined as the physical page descriptor. This descriptor logs the real-time operational characteristics of that physical page frame, registering parameters such as its current kernel subsystem allocation type, active reference counts, and whether its contents can be safely swapped or recycled under memory pressure states. The localized storage layout and array alignment of these struct page tracking blocks differ strictly based on the system's selected memory tracking model; for example, the standard Flat Memory (FLATMEM) tracking architecture packages these descriptors sequentially inside a master global array named mem_map. For a detailed architectural breakdown of memory model configurations, developers can consult Section 8.2.15.8.1.